package com.management.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.management.controller.form.MemberForm;
import com.management.controller.info.MemberInfo;
import com.management.controller.info.MenusInfo;
import com.management.model.AccountRole;
import com.management.dao.AccountRoleDao;
import com.management.service.AccountRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.management.utils.CopyUtils;
import com.management.utils.Result;


import lombok.Data;
import org.springframework.stereotype.Service;


import javax.annotation.Resource;
import java.util.List;


/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 龙世超
 * @since 2022-03-23
 */
@Service
public class AccountRoleServiceImpl extends ServiceImpl<AccountRoleDao, AccountRole> implements AccountRoleService {

    @Resource
    private AccountRoleDao accountRoleDao;

    /**
     * 分页查询所有成员
     * @param memberForm 分页参数
     * @return
     */
    @Override
    public Result findAllMembers(MemberForm memberForm) {
       List<MemberInfo> list=accountRoleDao.selectMembers();

//        MemberForm page = page(memberForm);
//        Page<MemberInfo> result=new Page<>();
//        result.setRecords(list);
//        result.setSize(page.getSize());
//        result.setTotal(page.getTotal());
//        result.setPages(page.getPages());
//        result.setCurrent(page.getCurrent());
        return Result.getInstanceList(MemberInfo.class).setData(list);
    }
}
